"""
Project Name : api_automation_framework
File Name : relative-redirect.py
Author : lldhsds
Date : 2024/12/29 15:58
Description: /relative-redirect/{n} Relatively 302 Redirects n times.
"""

import requests

def relative_redirect(n: int) -> None:
    """
    /relative-redirect/{n}, Relatively 302 Redirects n times.
    :param n: int
    :responses 200 Relatively 302 Redirects n times.
    """
    url = f"https://httpbin.org/relative-redirect/{n}"
    headers = {'Accept': 'text/html'}
    response = requests.get(url, headers=headers)
    print(response.status_code)
    print(response.text)
    print(response.headers)

relative_redirect(3)
